<template>
  <div class="account-container">
    <el-form :model="accountForm" label-width="50px" :rules="accountFormRules" ref="formRef">
      <el-form-item label="账号" prop="name">
        <el-input v-model="accountForm.name" />
      </el-form-item>
      <el-form-item label="密码" prop="password">
        <el-input v-model="accountForm.password" type="password" />
      </el-form-item>
    </el-form>
  </div>
</template>
<script lang="ts">
import { defineComponent, reactive, ref } from 'vue'
import { accountFormRules } from '../rules'
import type { ElForm } from 'element-plus'
export default defineComponent({
  name: 'LoginAccount',
  setup() {
    const accountForm = reactive({
      name: '',
      password: ''
    })
    const formRef = ref<InstanceType<typeof ElForm>>()
    return {
      accountForm,
      accountFormRules,
      formRef
    }
  }
})
</script>
<style scoped lang="less"></style>
